<!-- HTML header for doxygen 1.8.13-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>MTB CAT1 Peripheral driver library: Master Low-Level</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen_style.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><a href="http://www.cypress.com/"><img alt="Logo" src="IFXCYP_one-line.png"/></a></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">MTB CAT1 Peripheral driver library</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('group__group__scb__i2c__master__low__level__functions.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">Master Low-Level<div class="ingroups"><a class="el" href="group__group__scb.html">SCB          (Serial Communication Block)</a> &raquo; <a class="el" href="group__group__scb__i2c.html">I2C (SCB)</a> &raquo; <a class="el" href="group__group__scb__i2c__functions.html">Functions</a></div></div>  </div>
</div><!--header-->
<div class="contents">
<a name="details" id="details"></a><h2 class="groupheader">General Description</h2>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ga15fa1a79148b846fd348ce39094876f0"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__group__scb__i2c__enums.html#gaf621eb0719ad9ad7178d02268575b247">cy_en_scb_i2c_status_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__scb__i2c__master__low__level__functions.html#ga15fa1a79148b846fd348ce39094876f0">Cy_SCB_I2C_MasterSendStart</a> (<a class="el" href="struct_cy_s_c_b___type.html">CySCB_Type</a> *base, uint32_t address, <a class="el" href="group__group__scb__i2c__enums.html#ga6a168a5e662ce781920027bebbab5d8d">cy_en_scb_i2c_direction_t</a> bitRnW, uint32_t timeoutMs, <a class="el" href="structcy__stc__scb__i2c__context__t.html">cy_stc_scb_i2c_context_t</a> *context)</td></tr>
<tr class="memdesc:ga15fa1a79148b846fd348ce39094876f0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Generates a Start condition and sends a slave address with the Read/Write bit.  <a href="#ga15fa1a79148b846fd348ce39094876f0">More...</a><br /></td></tr>
<tr class="separator:ga15fa1a79148b846fd348ce39094876f0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga2177b4fb74cf33e57e6fa59d04bdfa7a"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__group__scb__i2c__enums.html#gaf621eb0719ad9ad7178d02268575b247">cy_en_scb_i2c_status_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__scb__i2c__master__low__level__functions.html#ga2177b4fb74cf33e57e6fa59d04bdfa7a">Cy_SCB_I2C_MasterSendReStart</a> (<a class="el" href="struct_cy_s_c_b___type.html">CySCB_Type</a> *base, uint32_t address, <a class="el" href="group__group__scb__i2c__enums.html#ga6a168a5e662ce781920027bebbab5d8d">cy_en_scb_i2c_direction_t</a> bitRnW, uint32_t timeoutMs, <a class="el" href="structcy__stc__scb__i2c__context__t.html">cy_stc_scb_i2c_context_t</a> *context)</td></tr>
<tr class="memdesc:ga2177b4fb74cf33e57e6fa59d04bdfa7a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Generates a ReStart condition and sends a slave address with the Read/Write bit.  <a href="#ga2177b4fb74cf33e57e6fa59d04bdfa7a">More...</a><br /></td></tr>
<tr class="separator:ga2177b4fb74cf33e57e6fa59d04bdfa7a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga4b098cd781eaa5cd287ae33e05c86a0d"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__group__scb__i2c__enums.html#gaf621eb0719ad9ad7178d02268575b247">cy_en_scb_i2c_status_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__scb__i2c__master__low__level__functions.html#ga4b098cd781eaa5cd287ae33e05c86a0d">Cy_SCB_I2C_MasterSendStop</a> (<a class="el" href="struct_cy_s_c_b___type.html">CySCB_Type</a> *base, uint32_t timeoutMs, <a class="el" href="structcy__stc__scb__i2c__context__t.html">cy_stc_scb_i2c_context_t</a> *context)</td></tr>
<tr class="memdesc:ga4b098cd781eaa5cd287ae33e05c86a0d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Generates a Stop condition to complete the current transaction.  <a href="#ga4b098cd781eaa5cd287ae33e05c86a0d">More...</a><br /></td></tr>
<tr class="separator:ga4b098cd781eaa5cd287ae33e05c86a0d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga0679a2b27cf3be4d1a6cd20246688fef"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__group__scb__i2c__enums.html#gaf621eb0719ad9ad7178d02268575b247">cy_en_scb_i2c_status_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__scb__i2c__master__low__level__functions.html#ga0679a2b27cf3be4d1a6cd20246688fef">Cy_SCB_I2C_MasterReadByte</a> (<a class="el" href="struct_cy_s_c_b___type.html">CySCB_Type</a> *base, <a class="el" href="group__group__scb__i2c__enums.html#ga4600410051f7febf79d167ffbf85d7ef">cy_en_scb_i2c_command_t</a> ackNack, uint8_t *byte, uint32_t timeoutMs, <a class="el" href="structcy__stc__scb__i2c__context__t.html">cy_stc_scb_i2c_context_t</a> *context)</td></tr>
<tr class="memdesc:ga0679a2b27cf3be4d1a6cd20246688fef"><td class="mdescLeft">&#160;</td><td class="mdescRight">Reads one byte from a slave and generates an ACK or prepares to generate a NAK.  <a href="#ga0679a2b27cf3be4d1a6cd20246688fef">More...</a><br /></td></tr>
<tr class="separator:ga0679a2b27cf3be4d1a6cd20246688fef"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga7eb0684e4d362668f0637d1e82405551"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__group__scb__i2c__enums.html#gaf621eb0719ad9ad7178d02268575b247">cy_en_scb_i2c_status_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__scb__i2c__master__low__level__functions.html#ga7eb0684e4d362668f0637d1e82405551">Cy_SCB_I2C_MasterWriteByte</a> (<a class="el" href="struct_cy_s_c_b___type.html">CySCB_Type</a> *base, uint8_t byte, uint32_t timeoutMs, <a class="el" href="structcy__stc__scb__i2c__context__t.html">cy_stc_scb_i2c_context_t</a> *context)</td></tr>
<tr class="memdesc:ga7eb0684e4d362668f0637d1e82405551"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sends one byte to a slave.  <a href="#ga7eb0684e4d362668f0637d1e82405551">More...</a><br /></td></tr>
<tr class="separator:ga7eb0684e4d362668f0637d1e82405551"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Function Documentation</h2>
<a id="ga15fa1a79148b846fd348ce39094876f0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga15fa1a79148b846fd348ce39094876f0">&#9670;&nbsp;</a></span>Cy_SCB_I2C_MasterSendStart()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__group__scb__i2c__enums.html#gaf621eb0719ad9ad7178d02268575b247">cy_en_scb_i2c_status_t</a> Cy_SCB_I2C_MasterSendStart </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_cy_s_c_b___type.html">CySCB_Type</a> *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>address</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__group__scb__i2c__enums.html#ga6a168a5e662ce781920027bebbab5d8d">cy_en_scb_i2c_direction_t</a>&#160;</td>
          <td class="paramname"><em>bitRnW</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>timeoutMs</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structcy__stc__scb__i2c__context__t.html">cy_stc_scb_i2c_context_t</a> *&#160;</td>
          <td class="paramname"><em>context</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Generates a Start condition and sends a slave address with the Read/Write bit. </p>
<p>This function is blocking. It does not return until the Start condition and address byte are sent and a ACK/NAK is received, or an error or timeout occurs.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>The pointer to the I2C SCB instance.</td></tr>
    <tr><td class="paramname">address</td><td>7 bit right justified slave address.</td></tr>
    <tr><td class="paramname">bitRnW</td><td>This sets the value of the Read/Write bit in the address, thus defining the direction of the following transfer. See <a class="el" href="group__group__scb__i2c__enums.html#ga6a168a5e662ce781920027bebbab5d8d">cy_en_scb_i2c_direction_t</a> for the set of constants.</td></tr>
    <tr><td class="paramname">timeoutMs</td><td>Defines in milliseconds the time for which this function can block. If that time expires, the function returns. If a zero is passed, the function waits forever for the action to complete. If a timeout occurs, the SCB block is reset. Note The maximum value is UINT32_MAX/1000.</td></tr>
    <tr><td class="paramname">context</td><td>The pointer to the context structure <a class="el" href="structcy__stc__scb__i2c__context__t.html">cy_stc_scb_i2c_context_t</a> allocated by the user. The structure is used during the I2C operation for internal configuration and data retention. The user must not modify anything in this structure.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="group__group__scb__i2c__enums.html#gaf621eb0719ad9ad7178d02268575b247">cy_en_scb_i2c_status_t</a></dd></dl>
<dl class="section note"><dt>Note</dt><dd>After a read transaction is initiated and the slave ACKs the address, at least one byte must be read before completing the transaction or changing its direction. </dd></dl>

</div>
</div>
<a id="ga2177b4fb74cf33e57e6fa59d04bdfa7a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga2177b4fb74cf33e57e6fa59d04bdfa7a">&#9670;&nbsp;</a></span>Cy_SCB_I2C_MasterSendReStart()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__group__scb__i2c__enums.html#gaf621eb0719ad9ad7178d02268575b247">cy_en_scb_i2c_status_t</a> Cy_SCB_I2C_MasterSendReStart </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_cy_s_c_b___type.html">CySCB_Type</a> *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>address</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__group__scb__i2c__enums.html#ga6a168a5e662ce781920027bebbab5d8d">cy_en_scb_i2c_direction_t</a>&#160;</td>
          <td class="paramname"><em>bitRnW</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>timeoutMs</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structcy__stc__scb__i2c__context__t.html">cy_stc_scb_i2c_context_t</a> *&#160;</td>
          <td class="paramname"><em>context</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Generates a ReStart condition and sends a slave address with the Read/Write bit. </p>
<p>This function is blocking. It does not return until the ReStart condition and address byte are sent and an ACK/NAK is received, or an error or timeout occurs.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>The pointer to the I2C SCB instance.</td></tr>
    <tr><td class="paramname">address</td><td>A 7-bit right-justified slave address.</td></tr>
    <tr><td class="paramname">bitRnW</td><td>This sets the value of the Read/Write bit in the address, thus defining the direction of the following transfer. See <a class="el" href="group__group__scb__i2c__enums.html#ga6a168a5e662ce781920027bebbab5d8d">cy_en_scb_i2c_direction_t</a> for the set of constants.</td></tr>
    <tr><td class="paramname">timeoutMs</td><td>Defines in milliseconds the time for which this function can block. If that time expires, the function returns. If a zero is passed, the function waits forever for the action to complete. If a timeout occurs, the SCB block is reset. Note The maximum value is UINT32_MAX/1000.</td></tr>
    <tr><td class="paramname">context</td><td>The pointer to the context structure <a class="el" href="structcy__stc__scb__i2c__context__t.html">cy_stc_scb_i2c_context_t</a> allocated by the user. The structure is used during the I2C operation for internal configuration and data retention. The user must not modify anything in this structure.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="group__group__scb__i2c__enums.html#gaf621eb0719ad9ad7178d02268575b247">cy_en_scb_i2c_status_t</a></dd></dl>
<dl class="section note"><dt>Note</dt><dd><ul>
<li>A successful transaction must be initiated by <a class="el" href="group__group__scb__i2c__master__low__level__functions.html#ga15fa1a79148b846fd348ce39094876f0">Cy_SCB_I2C_MasterSendStart</a> before calling this function. If this condition is not met, this function does nothing and returns <a class="el" href="group__group__scb__i2c__enums.html#ggaf621eb0719ad9ad7178d02268575b247a87d64b12d320a5119189d10f4d4adf18">CY_SCB_I2C_MASTER_NOT_READY</a>.</li>
<li>After a read transaction is initiated and the slave ACKs the address, at least one byte must be read before completing the transaction or changing its direction. </li>
</ul>
</dd></dl>

</div>
</div>
<a id="ga4b098cd781eaa5cd287ae33e05c86a0d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga4b098cd781eaa5cd287ae33e05c86a0d">&#9670;&nbsp;</a></span>Cy_SCB_I2C_MasterSendStop()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__group__scb__i2c__enums.html#gaf621eb0719ad9ad7178d02268575b247">cy_en_scb_i2c_status_t</a> Cy_SCB_I2C_MasterSendStop </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_cy_s_c_b___type.html">CySCB_Type</a> *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>timeoutMs</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structcy__stc__scb__i2c__context__t.html">cy_stc_scb_i2c_context_t</a> *&#160;</td>
          <td class="paramname"><em>context</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Generates a Stop condition to complete the current transaction. </p>
<p>This function is blocking. It does not return until the Stop condition is generated, or an error or timeout occurs.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>The pointer to the I2C SCB instance.</td></tr>
    <tr><td class="paramname">timeoutMs</td><td>Defines in milliseconds the time for which this function can block. If that time expires, the function returns. If a zero is passed, the function waits forever for the action to complete. If a timeout occurs, the SCB block is reset. Note The maximum value is UINT32_MAX/1000.</td></tr>
    <tr><td class="paramname">context</td><td>The pointer to the context structure <a class="el" href="structcy__stc__scb__i2c__context__t.html">cy_stc_scb_i2c_context_t</a> allocated by the user. The structure is used during the I2C operation for internal configuration and data retention. The user must not modify anything in this structure.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="group__group__scb__i2c__enums.html#gaf621eb0719ad9ad7178d02268575b247">cy_en_scb_i2c_status_t</a></dd></dl>
<dl class="section note"><dt>Note</dt><dd><ul>
<li>A successful transaction must be initiated by <a class="el" href="group__group__scb__i2c__master__low__level__functions.html#ga15fa1a79148b846fd348ce39094876f0">Cy_SCB_I2C_MasterSendStart</a> or <a class="el" href="group__group__scb__i2c__master__low__level__functions.html#ga2177b4fb74cf33e57e6fa59d04bdfa7a">Cy_SCB_I2C_MasterSendReStart</a> before calling this function. If this condition is not met, this function does nothing and returns. <a class="el" href="group__group__scb__i2c__enums.html#ggaf621eb0719ad9ad7178d02268575b247a87d64b12d320a5119189d10f4d4adf18">CY_SCB_I2C_MASTER_NOT_READY</a>.</li>
<li>Even after the slave NAKs the address, this function must be called to complete the transaction. </li>
</ul>
</dd></dl>

</div>
</div>
<a id="ga0679a2b27cf3be4d1a6cd20246688fef"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga0679a2b27cf3be4d1a6cd20246688fef">&#9670;&nbsp;</a></span>Cy_SCB_I2C_MasterReadByte()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__group__scb__i2c__enums.html#gaf621eb0719ad9ad7178d02268575b247">cy_en_scb_i2c_status_t</a> Cy_SCB_I2C_MasterReadByte </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_cy_s_c_b___type.html">CySCB_Type</a> *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__group__scb__i2c__enums.html#ga4600410051f7febf79d167ffbf85d7ef">cy_en_scb_i2c_command_t</a>&#160;</td>
          <td class="paramname"><em>ackNack</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t *&#160;</td>
          <td class="paramname"><em>byte</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>timeoutMs</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structcy__stc__scb__i2c__context__t.html">cy_stc_scb_i2c_context_t</a> *&#160;</td>
          <td class="paramname"><em>context</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Reads one byte from a slave and generates an ACK or prepares to generate a NAK. </p>
<p>The NAK will be generated before a Stop or ReStart condition by <a class="el" href="group__group__scb__i2c__master__low__level__functions.html#ga4b098cd781eaa5cd287ae33e05c86a0d">Cy_SCB_I2C_MasterSendStop</a> or <a class="el" href="group__group__scb__i2c__master__low__level__functions.html#ga2177b4fb74cf33e57e6fa59d04bdfa7a">Cy_SCB_I2C_MasterSendReStart</a> function appropriately. This function is blocking. It does not return until a byte is received, or an error or timeout occurs.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>The pointer to the I2C SCB instance.</td></tr>
    <tr><td class="paramname">ackNack</td><td>A response to a received byte. See <a class="el" href="group__group__scb__i2c__enums.html#ga4600410051f7febf79d167ffbf85d7ef">cy_en_scb_i2c_command_t</a> for the set of constants.</td></tr>
    <tr><td class="paramname">byte</td><td>The pointer to the location to store the Read byte.</td></tr>
    <tr><td class="paramname">timeoutMs</td><td>Defines in milliseconds the time for which this function can block. If that time expires, the function returns. If a zero is passed, the function waits forever for the action to complete. If a timeout occurs, the SCB block is reset. Note The maximum value is UINT32_MAX/1000.</td></tr>
    <tr><td class="paramname">context</td><td>The pointer to the context structure <a class="el" href="structcy__stc__scb__i2c__context__t.html">cy_stc_scb_i2c_context_t</a> allocated by the user. The structure is used during the I2C operation for internal configuration and data retention. The user must not modify anything in this structure.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="group__group__scb__i2c__enums.html#gaf621eb0719ad9ad7178d02268575b247">cy_en_scb_i2c_status_t</a></dd></dl>
<dl class="section note"><dt>Note</dt><dd>A successful transaction must be initiated by <a class="el" href="group__group__scb__i2c__master__low__level__functions.html#ga15fa1a79148b846fd348ce39094876f0">Cy_SCB_I2C_MasterSendStart</a> or <a class="el" href="group__group__scb__i2c__master__low__level__functions.html#ga2177b4fb74cf33e57e6fa59d04bdfa7a">Cy_SCB_I2C_MasterSendReStart</a> before calling this function. If this condition is not met, this function does nothing and returns <a class="el" href="group__group__scb__i2c__enums.html#ggaf621eb0719ad9ad7178d02268575b247a87d64b12d320a5119189d10f4d4adf18">CY_SCB_I2C_MASTER_NOT_READY</a>. </dd></dl>

</div>
</div>
<a id="ga7eb0684e4d362668f0637d1e82405551"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga7eb0684e4d362668f0637d1e82405551">&#9670;&nbsp;</a></span>Cy_SCB_I2C_MasterWriteByte()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__group__scb__i2c__enums.html#gaf621eb0719ad9ad7178d02268575b247">cy_en_scb_i2c_status_t</a> Cy_SCB_I2C_MasterWriteByte </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_cy_s_c_b___type.html">CySCB_Type</a> *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>byte</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>timeoutMs</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structcy__stc__scb__i2c__context__t.html">cy_stc_scb_i2c_context_t</a> *&#160;</td>
          <td class="paramname"><em>context</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Sends one byte to a slave. </p>
<p>This function is blocking. It does not return until a byte is transmitted, or an error or timeout occurs.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>The pointer to the I2C SCB instance.</td></tr>
    <tr><td class="paramname">byte</td><td>The byte to write to a slave.</td></tr>
    <tr><td class="paramname">timeoutMs</td><td>Defines in milliseconds the time for which this function can block. If that time expires, the function returns. If a zero is passed, the function waits forever for the action to complete. If a timeout occurs, the SCB block is reset. Note The maximum value is UINT32_MAX/1000.</td></tr>
    <tr><td class="paramname">context</td><td>The pointer to the context structure <a class="el" href="structcy__stc__scb__i2c__context__t.html">cy_stc_scb_i2c_context_t</a> allocated by the user. The structure is used during the I2C operation for internal configuration and data retention. The user must not modify anything in this structure.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="group__group__scb__i2c__enums.html#gaf621eb0719ad9ad7178d02268575b247">cy_en_scb_i2c_status_t</a></dd></dl>
<dl class="section note"><dt>Note</dt><dd>A successful transaction must be initiated by <a class="el" href="group__group__scb__i2c__master__low__level__functions.html#ga15fa1a79148b846fd348ce39094876f0">Cy_SCB_I2C_MasterSendStart</a> or <a class="el" href="group__group__scb__i2c__master__low__level__functions.html#ga2177b4fb74cf33e57e6fa59d04bdfa7a">Cy_SCB_I2C_MasterSendReStart</a> before calling this function. If this condition is not met, this function does nothing and returns <a class="el" href="group__group__scb__i2c__enums.html#ggaf621eb0719ad9ad7178d02268575b247a87d64b12d320a5119189d10f4d4adf18">CY_SCB_I2C_MASTER_NOT_READY</a>. </dd></dl>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part
<div id="nav-path" class="navpath">
    <ul>
        <li class="footer">
            Generated for <b>MTB CAT1 Peripheral driver library</b> by <b>Cypress Semiconductor Corporation</b>.
            All rights reserved.
        </li>
    </ul>
</div>
-->
</body>
</html>
